class CircleDetailsInfoItem extends ComponentEx {
    public host: CircleMainPanelAI;

    private lab_rank: eui.Label;
    private lab_roomid: eui.Label;
    private lab_time: eui.Label;
    private btn_reback: eui.Button;

    childrenCreated() {
        super.childrenCreated();
        this.skinName = "CircleDetailsInfoItemSkin";
        this.initComplete = true;
        this.btn_reback.addEventListener(egret.TouchEvent.TOUCH_TAP, this.reback, this)
    }

    public update(data: any) {
        const info: CircleRoomInfo = game.circleRoomInfo;
        if (!info.rank) { return };
        this.lab_rank.text = "" + info.rank;
        this.lab_roomid.text = "房间: " + info.roomid;
        this.lab_time.text = "时间: " + info.timer;

    }

    private reback(e: egret.Event) {
        this.host.detailsBack();
    }

}